Optimal. Leaf size=140 \[ -\frac {a^2 c \tan ^3(e+f x) \cos ^2(e+f x)^{\frac {p+3}{2}} (g \sec (e+f x))^p \, _2F_1\left (\frac {3}{2},\frac {p+3}{2};\frac {5}{2};\sin ^2(e+f x)\right )}{3 f}-\frac {a^2 c \tan ^3(e+f x) \cos ^2(e+f x)^{\frac {p+4}{2}} (g \sec (e+f x))^{p+1} \, _2F_1\left (\frac {3}{2},\frac {p+4}{2};\frac {5}{2};\sin ^2(e+f x)\right )}{3 f g} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.20, antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.088, Rules used = {3962, 2617, 16} \[ -\frac {a^2 c \tan ^3(e+f x) \cos ^2(e+f x)^{\frac {p+3}{2}} (g \sec (e+f x))^p \, _2F_1\left (\frac {3}{2},\frac {p+3}{2};\frac {5}{2};\sin ^2(e+f x)\right )}{3 f}-\frac {a^2 c \tan ^3(e+f x) \cos ^2(e+f x)^{\frac {p+4}{2}} (g \sec (e+f x))^{p+1} \, _2F_1\left (\frac {3}{2},\frac {p+4}{2};\frac {5}{2};\sin ^2(e+f x)\right )}{3 f g} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 16
Rule 2617
Rule 3962
Rubi steps
\begin {align*} \int (g \sec (e+f x))^p (a+a \sec (e+f x))^2 (c-c \sec (e+f x)) \, dx &=-\left ((a c) \int \left (a (g \sec (e+f x))^p \tan ^2(e+f x)+a \sec (e+f x) (g \sec (e+f x))^p \tan ^2(e+f x)\right ) \, dx\right )\\ &=-\left (\left (a^2 c\right ) \int (g \sec (e+f x))^p \tan ^2(e+f x) \, dx\right )-\left (a^2 c\right ) \int \sec (e+f x) (g \sec (e+f x))^p \tan ^2(e+f x) \, dx\\ &=-\frac {a^2 c \cos ^2(e+f x)^{\frac {3+p}{2}} \, _2F_1\left (\frac {3}{2},\frac {3+p}{2};\frac {5}{2};\sin ^2(e+f x)\right ) (g \sec (e+f x))^p \tan ^3(e+f x)}{3 f}-\frac {\left (a^2 c\right ) \int (g \sec (e+f x))^{1+p} \tan ^2(e+f x) \, dx}{g}\\ &=-\frac {a^2 c \cos ^2(e+f x)^{\frac {3+p}{2}} \, _2F_1\left (\frac {3}{2},\frac {3+p}{2};\frac {5}{2};\sin ^2(e+f x)\right ) (g \sec (e+f x))^p \tan ^3(e+f x)}{3 f}-\frac {a^2 c \cos ^2(e+f x)^{\frac {4+p}{2}} \, _2F_1\left (\frac {3}{2},\frac {4+p}{2};\frac {5}{2};\sin ^2(e+f x)\right ) (g \sec (e+f x))^{1+p} \tan ^3(e+f x)}{3 f g}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 30.61, size = 7087, normalized size = 50.62 \[ \text {Result too large to show} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.44, size = 0, normalized size = 0.00 \[ {\rm integral}\left (-{\left (a^{2} c \sec \left (f x + e\right )^{3} + a^{2} c \sec \left (f x + e\right )^{2} - a^{2} c \sec \left (f x + e\right ) - a^{2} c\right )} \left (g \sec \left (f x + e\right )\right )^{p}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int -{\left (a \sec \left (f x + e\right ) + a\right )}^{2} {\left (c \sec \left (f x + e\right ) - c\right )} \left (g \sec \left (f x + e\right )\right )^{p}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 3.00, size = 0, normalized size = 0.00 \[ \int \left (g \sec \left (f x +e \right )\right )^{p} \left (a +a \sec \left (f x +e \right )\right )^{2} \left (c -c \sec \left (f x +e \right )\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ -\int {\left (a \sec \left (f x + e\right ) + a\right )}^{2} {\left (c \sec \left (f x + e\right ) - c\right )} \left (g \sec \left (f x + e\right )\right )^{p}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^2\,\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )\,{\left (\frac {g}{\cos \left (e+f\,x\right )}\right )}^p \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ - a^{2} c \left (\int \left (- \left (g \sec {\left (e + f x \right )}\right )^{p}\right )\, dx + \int \left (- \left (g \sec {\left (e + f x \right )}\right )^{p} \sec {\left (e + f x \right )}\right )\, dx + \int \left (g \sec {\left (e + f x \right )}\right )^{p} \sec ^{2}{\left (e + f x \right )}\, dx + \int \left (g \sec {\left (e + f x \right )}\right )^{p} \sec ^{3}{\left (e + f x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________